#define _CRT_SECURE_NO_WARNINGS 1
int singleNumber(int* nums, int numsSize) {
    int ret = 0;
    int i = 0, j = 0, res = 0;
    for (i = 0; i < 32; i++)
    {
        ret = 0;
        for (j = 0; j < numsSize; ++j)
        {
            ret += (nums[j] >> i) & 1;
        }
        if (ret % 3 != 0)
            res = res | (1 << i);
    }
    return res;
}